home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / prog_bas / oledsrvr.zip / SRVRTIMR.FRM < prev   
Text File  |  1996-01-03  |  2KB  |  78 lines

  1. VERSION 4.00
  2. Begin VB.Form frmTimer 
  3.    Caption         =   "olesrv3"
  4.    ClientHeight    =   2895
  5.    ClientLeft      =   4155
  6.    ClientTop       =   960
  7.    ClientWidth     =   3000
  8.    ControlBox      =   0   'False
  9.    Height          =   3300
  10.    Left            =   4095
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2895
  15.    ScaleWidth      =   3000
  16.    Top             =   615
  17.    Visible         =   0   'False
  18.    Width           =   3120
  19.    Begin VB.CommandButton Command1 
  20.       Caption         =   "&Clear"
  21.       Height          =   360
  22.       Left            =   1845
  23.       TabIndex        =   1
  24.       Top             =   2385
  25.       Width           =   1035
  26.    End
  27.    Begin VB.ListBox List1 
  28.       Height          =   2205
  29.       Left            =   30
  30.       TabIndex        =   0
  31.       Top             =   45
  32.       Width           =   2820
  33.    End
  34.    Begin VB.Timer Timer1 
  35.       Interval        =   8000
  36.       Left            =   1245
  37.       Top             =   735
  38.    End
  39. End
  40. Attribute VB_Name = "frmTimer"
  41. Attribute VB_Creatable = False
  42. Attribute VB_Exposed = False
  43. Option Explicit
  44.  
  45. Private Sub Command1_Click()
  46. List1.Clear
  47. End Sub
  48.  
  49.  
  50. Private Sub timer1_Timer()
  51.  
  52. '-----  Run continuously until all object
  53. '       references are released.  For testing,
  54. '       leave running until manual program
  55. '       shutdown.
  56.  
  57. '-----  Note: in real-life situation there would
  58. '       be an error handler in function NxtItm().
  59.  
  60. Dim lngCount As Long
  61.  
  62. If gcolQueue.Count > 0 Then
  63.   timer1.Enabled = False
  64.   List1.AddItem gcolQueue(1).ID & ": Processing request "
  65.   List1.Refresh
  66.   lngCount = NxtItm()
  67.   gcolQueue(1).Notify (lngCount)
  68.   gcolQueue.Remove 1
  69.   timer1.Enabled = True
  70. End If
  71.  
  72.  
  73.  
  74.  
  75. End Sub
  76.  
  77.  
  78.